home *** CD-ROM | disk | FTP | other *** search
/ Symantec Visual Cafe for Java 2.5 / symantec-visual-cafe-2.5-database-dev-edition.iso / Visual Cafe Pro v1.0 / TUTORIAL.BIN / LongVarBinary.class (.txt) < prev    next >
Encoding:
Java Class File  |  1997-01-30  |  2.5 KB  |  72 lines

  1. package symantec.itools.db.net;
  2.  
  3. import java.io.DataInputStream;
  4. import java.io.DataOutputStream;
  5. import java.io.IOException;
  6. import java.io.InputStream;
  7. import symjava.sql.SQLException;
  8.  
  9. public class LongVarBinary extends BinaryField {
  10.    LongVarBinary() {
  11.    }
  12.  
  13.    int getType() {
  14.       return 72;
  15.    }
  16.  
  17.    void read(DataInputStream is) throws SQLException, IOException, ErrorException {
  18.       super.read(is);
  19.       ServerObject obj = (ServerObject)NetClass.getNextObject(is);
  20.       if (obj.getType() != 50) {
  21.          ((ServerObject)this).onObjectError(obj);
  22.       }
  23.  
  24.    }
  25.  
  26.    void write(DataOutputStream os) throws IOException {
  27.       super.write(os);
  28.       EOT eot = new EOT();
  29.       eot.write(os);
  30.    }
  31.  
  32.    boolean storesData() {
  33.       return false;
  34.    }
  35.  
  36.    public InputStream getAsciiStream() throws SQLException {
  37.       throw new SQLException("Can't convert data to requested format");
  38.    }
  39.  
  40.    public InputStream getUnicodeStream() throws SQLException {
  41.       throw new SQLException("Can't convert data to requested format");
  42.    }
  43.  
  44.    public InputStream getBinaryStream() throws SQLException {
  45.       throw new SQLException("Can't convert data to requested format");
  46.    }
  47.  
  48.    public void setAsciiStream(InputStream x, int length) throws SQLException {
  49.       throw new SQLException("Can't convert data to requested format");
  50.    }
  51.  
  52.    public void setUnicodeStream(InputStream x, int length) throws SQLException {
  53.       throw new SQLException("Can't convert data to requested format");
  54.    }
  55.  
  56.    public void setBinaryStream(InputStream x, int length) throws SQLException {
  57.       throw new SQLException("Can't convert data to requested format");
  58.    }
  59.  
  60.    public int getSQLType() {
  61.       return -4;
  62.    }
  63.  
  64.    public Object getObject() throws SQLException {
  65.       throw new SQLException("Can't convert data to requested format");
  66.    }
  67.  
  68.    public void setObject(Object obj) throws SQLException {
  69.       throw new SQLException("Can't convert data to requested format");
  70.    }
  71. }
  72.